<?php

// $Id$

require_once(TANGRA_MAIN_DIR.'form/fields/text/form_field_text_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/select/form_field_select_semidynamic_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/checkbox/form_field_checkbox_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/guardable_form_view.class.php');


class VPT_CI_Form_View extends Guardable_Form_View {
	function __construct(Form &$form) {
		parent::__construct($form);

		$f_ci_name = $form->get_field('ci_name');
		$f_ci_name_view = new Form_Field_Text_View($form->get_name().'_'.$f_ci_name->get_name(), $f_ci_name);
		$this->add_field_view('ci_name', $f_ci_name_view);

		$f_ci_type = $form->get_field('ci_type');
		$f_ci_type_view = new Form_Field_Select_Semidynamic_View($form->get_name().'_'.$f_ci_type->get_name(), $f_ci_type);
		$this->add_field_view('ci_type', $f_ci_type_view);

		$f_required = $form->get_field('required');
		$f_required_view = new Form_Field_Checkbox_View($form->get_name().'_'.$f_required->get_name(), $f_required);
		$this->add_field_view('required', $f_required_view);

		$f_export_name = $form->get_field('export_name');
		$f_export_name_view = new Form_Field_Text_View($form->get_name().'_'.$f_export_name->get_name(), $f_export_name);
		$this->add_field_view('export_name', $f_export_name_view);
	}
}